package com.train.common.utils.thread;

public class ThreadLocalUtils {

    private static final ThreadLocal<Object> THREADLOCAL = new ThreadLocal<>();

    /**
     * 添加threadlocal
     */
    public static void set(Object obj) {
        THREADLOCAL.set(obj);
    }

    /**
     * 获取threadlocal
     * @return
     */
    public static Object get() {
        return THREADLOCAL.get();
    }

    /**
     * 移除threadlocal
     */
    public static void remove() {
        THREADLOCAL.remove();
    }
}
